package com.springboot.dao.impl;

import com.springboot.dao.Test2StudentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author peter
 * @title: Test2StudentDaoImp
 * @projectName springAll-peter
 * @description: TODO
 * @date 19-5-5下午7:29
 */

@Repository
public class Test2StudentDaoImp implements Test2StudentDao {

    @Autowired
    @Qualifier("test2JdbcTemplate")
    private JdbcTemplate jdbcTemplate;

    @Override
    public List<Map<String, Object>> getAllStudents() {
        return jdbcTemplate.queryForList("select * from student");
    }
}
